package com.pfzy.traveldriver3

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.pfzy.utildemo.R

class ActivityAdapter(data: MutableList<DemoDetails>) : BaseQuickAdapter<DemoDetails, BaseViewHolder>(R.layout.item_main, data) {
    override fun convert(helper: BaseViewHolder, item: DemoDetails) {
        helper.setText(R.id.item_main_title, "         " + item.title)
    }

    var onItemClickListener: OnItemClickListener? = null

    /**
     * 点击事件
     */
    fun setOnItemClick(listener: OnItemClickListener?) {
        onItemClickListener = listener
    }

    interface OnItemClickListener {
        fun onclick(pos: Int)
    }
}